// 
import { axios } from '@/utils/request'

//模板库列表
export function templateBase(params) {
    return axios({
        url: '/school/activities/template-list',
        method: 'post',
        data: params
    }) 
}

//活动列表
export function activityList(params) {
    return axios({
        url: '/school/activities',
        method: 'post',
        data: params
    })
}
//发布活动
export function publishActivity(id) {
    return axios({
        url: '/school/activities/' + id + '/release',
        method: 'post',
        // data: params
    })
}

export function delActivity(id) {
    return axios({
        url: '/school/activities/' + id + '/delete',
        method: 'post',
    })
}

//接龙创建
export function chainsCreate(params) {
    return axios({
        url: '/activity/activities/create',
        method: 'post',
        data: params
    })
}

//接龙编辑
export function chainsEdit(params, id) {
    return axios({
        url: '/activity/activities/' + id + '/update',
        method: 'post',
        data: params
    })
}

export function activityInfo(id) {
    return axios({
        url: '/activity/activities/'+id,
        method: 'post',
    })
}
//活动  海报  获取海报图片

export function getPoster(params, id) {
    return axios({
        url: '/activity/activities/'+id+'/make-poster',
        method: 'post',
        data: params
    })
}
//设置家长端可见
// 
export function parentCanSee(params, id) {
    return axios({
        url: '/school/activities/' + id + '/set-parent-can-see',
        method: 'post',
        data: params
    })
}
//活动报名详情
export function activitySignUpDetails(params, id) {
    return axios({
        url: '/school/activities/' + id + '/sign-up-list',
        method: 'post',
        data: params
    })
}
//活动报名弹窗alert数据
export function activitySignUpAlert(params, id) {
    return axios({
        url: '/school/activities/' + id + '/sign-up-statistics',
        method: 'post',
        data: params
    })
}

//活动报名弹窗   导出
export function exportSignUp(schoolID, id) {
    return axios({
        url: '/school/activities/export?school_id=' + schoolID + '&activity_id='+id,
        method: 'get',
    })
}

//时间分析
export function timeAnalysis(id) {
    return axios({
        url: '/school/activities/'+id+'/time-analysis',
        method: 'post',
    })
}